package br.com.escolaespacocrianca.fineec.component;


public class GenericBuilder<T> {
	
	    private Class<T> clazz;

	    public GenericBuilder(Class<T> clazz)
	    {
	        this.clazz = clazz;
	    }

	    public T build() throws RuntimeException
	    {
	        try {
				return clazz.newInstance();
			} catch (Exception e) {
				throw new RuntimeException(e.getMessage());
			} 
	    }
	
}
